import request from '@/plugin/axios'

export function fetchList (data) {
  return request({
    url: '/reserve/queryAllScheduleList',
    method: 'get'
  })
}

export function createOrEdit (data) {
  return request({
    url: '/user/editUser',
    method: 'post',
    data: data
  })
}

export function queryById (id) {
  return request({
    url: '/classroom/queryById?id=' + id,
    method: 'get'
  })
}

export function deleteById(id) {
  return request({
    url: '/reserve/deleteReserve?reserveDetailId=' + id,
    method: 'get'
  })
}

export function reserveDetailList(id) {
  return request({
    url: '/reserve/queryReserveDetailList?reserveId=' + id,
    method: 'get'
  })
}

export function createOrEdit4Pc(data) {
  return request({
    url: '/reserve/createOrEdit4Pc',
    method: 'post',
    data: data
  })
}

export function queryReserveDetailByUserId(id) {
  return request({
    url: '/reserve/queryReserveDetailByUserId?userId=' + id,
    method: 'get'
  })
} 

export function signIn(reserveId, id) {
  return request({
    url: '/reserve/signIn?reserveId=' + reserveId + '&id=' + id,
    method: 'get'
  })
}

export function startCourse(id) {
  return request({
    url: '/reserve/startCourse?reserveId=' + id,
    method: 'get'
  })
}